URL Parameter Passing

Set URL parameters using ModifyRedirectUrl

Description
This customization shows how to set the URL parameters using the ModifyRedirectUrl() method.
Variables
Record Control Class
Select a table control in which the two field value controls are present
First Field Value
Select the First field to concatenate
Second Field Value
Select the Second field to concatenate
Applies to
RecordControl class
Code
 
/// 
/// Override the ModifyRedirectURL() to modify the redirect URL.
/// 
public override string ModifyRedirectUrl(string redirectUrl, string redirectArgument, bool bEncrypt)
{         
    // Initialize parameterValue to the concatenated valus of two field value controls. 
    string parameterValue = this.${First Field Value}.Text + this.${Second Field Value}.Text;
	 
    // append the parameter to URL
    redirectUrl = redirectUrl + "?myparam=" + parameterValue;
		
    // If the URL already contains paramter(s), for example, if redirect URL is "../Products/EditProducts.aspx?Orders=1" then, you need to modify the redirectURL like this:
	// redirectUrl = redirectUrl + "&myparam=" + parameterValue;
	   
	return base.ModifyRedirectUrl(redirectUrl, redirectArgument, bEncrypt);
}

     

Terms of Service Privacy Statement